package com.example.demo.controller;

import com.example.demo.dao.SchoolDao;
import com.example.demo.pojo.UserSchool;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 翁佃峰
 * date:2020/10/27 18:41
 */
@RestController
@RequestMapping("UserSchool")
public class SchoolController {
    @Resource
    SchoolDao schoolDao;

    /**
     * 得到用户和其学校信息
     * @return
     */
    @GetMapping("getUserSchoolList")
    public List<UserSchool> getUserSchoolList(){
        return schoolDao.getUserSchoolList();
    }
}
